<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
			<!-- template designed by Marco Von Ballmoos  -->
			<title>Docs For Class View</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
						<script src="../../media/lib/classTree.js"></script>
												<script language="javascript" type="text/javascript">
				var imgPlus = new Image();
				var imgMinus = new Image();
				imgPlus.src = "../../media/images/plus.png";
				imgMinus.src = "../../media/images/minus.png";
				
				function showNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgMinus.src;
					oTable.style.display = "block";
				}
				
				function hideNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgPlus.src;
					oTable.style.display = "none";
				}
				
				function nodeIsVisible(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
									break;
							}
					return (oTable && oTable.style.display == "block");
				}
				
				function toggleNodeVisibility(Node){
					if (nodeIsVisible(Node)){
						hideNode(Node);
					}else{
						showNode(Node);
					}
				}
			</script>
					</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class View</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">ThinkPHP 视图输出</p>
<p class="description"><p>支持缓存和页面压缩</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> liu21st &lt;<a href="mailto:liu21st@gmail.com">liu21st@gmail.com</a>&gt;</li>
				<li><span class="field">version:</span> $Id$</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Think---Core---View.class.php.html">/Think/Core/View.class.php</a> (line <span class="field">25</span>)
		</p>
		
				
		<pre><a href="../../Think/Core/Base.html">Base</a>
   |
   --View</pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																								<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$trace" title="details" class="var-name">$trace</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$tVar" title="details" class="var-name">$tVar</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$type" title="details" class="var-name">$type</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																										
				<div class="method-definition">
					static 						<span class="method-result">Template</span>
										<a href="#getInstance" title="details" class="method-name">getInstance</a>
										()
									</div>
																																										
				<div class="method-definition">
											<span class="method-result">View</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											([<span class="var-type"></span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">''</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#assign" title="details" class="method-name">assign</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">''</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">boolen</span>
										<a href="#checkCache" title="details" class="method-name">checkCache</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$tmplTemplateFile</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#display" title="details" class="method-name">display</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$templateFile</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$contentType</span> = <span class="var-default">'text/html'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$varPrefix</span> = <span class="var-default">''</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#fetch" title="details" class="method-name">fetch</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$templateFile</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$contentType</span> = <span class="var-default">'text/html'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$varPrefix</span> = <span class="var-default">''</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$display</span> = <span class="var-default">false</span>], <span class="var-type">integer</span>&nbsp;<span class="var-name">$mode</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#get" title="details" class="method-name">get</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																						
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#layout" title="details" class="method-name">layout</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$layoutFile</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$contentType</span> = <span class="var-default">'text/html'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$varPrefix</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$display</span> = <span class="var-default">true</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$layout</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#showTime" title="details" class="method-name">showTime</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$startTime</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#trace" title="details" class="method-name">trace</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$title</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">''</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$trace" id="$trace"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$trace</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">37</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$tVar" id="$tVar"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$tVar</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">35</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">模板页面显示变量，未经定义的变量不会显示在页面中</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$type" id="$type"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$type</span>
			 = <span class="var-default">	''</span>			(line <span class="line-number">40</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodgetInstance" id="getInstance"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static getInstance</span> (line <span class="line-number">51</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得模板对象实例</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result">Template</span>
		<span class="method-name">
			getInstance
		</span>
				()
			</div>
	
		
			
	</div>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">56</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">View</span>
		<span class="method-name">
			__construct
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">''</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$type</span>			</li>
				</ul>
		
			
	</div>
<a name="methodassign" id="assign"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">assign</span> (line <span class="line-number">74</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">模板变量赋值</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			assign
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">''</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$name</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$value</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcheckCache" id="checkCache"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">checkCache</span> (line <span class="line-number">251</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">检查缓存文件是否有效</p>
<p class="description"><p>如果无效则需要重新编译</p></p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolen</span>
		<span class="method-name">
			checkCache
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$tmplTemplateFile</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$tmplTemplateFile</span><span class="var-description">: 模板文件名</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddisplay" id="display"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">display</span> (line <span class="line-number">145</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">加载模板和页面输出 可以返回输出内容</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			display
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$templateFile</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$contentType</span> = <span class="var-default">'text/html'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$varPrefix</span> = <span class="var-default">''</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$templateFile</span><span class="var-description">: 模板文件名 留空为自动获取</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$charset</span><span class="var-description">: 模板输出字符集</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$contentType</span><span class="var-description">: 输出类型</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$varPrefix</span><span class="var-description">: 模板变量前缀</span>			</li>
				</ul>
		
			
	</div>
<a name="methodfetch" id="fetch"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">fetch</span> (line <span class="line-number">285</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">加载模板和页面输出</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			fetch
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$templateFile</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$contentType</span> = <span class="var-default">'text/html'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$varPrefix</span> = <span class="var-default">''</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$display</span> = <span class="var-default">false</span>], <span class="var-type">integer</span>&nbsp;<span class="var-name">$mode</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$templateFile</span><span class="var-description">: 模板文件名 留空为自动获取</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$charset</span><span class="var-description">: 模板输出字符集</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$contentType</span><span class="var-description">: 输出类型</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$varPrefix</span><span class="var-description">: 模板变量前缀</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$mode</span><span class="var-description">: 0 返回 1 输出 2 下载</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$display</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget" id="get"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">get</span> (line <span class="line-number">113</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得模板变量的值</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			get
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span>			</li>
				</ul>
		
			
	</div>
<a name="methodlayout" id="layout"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">layout</span> (line <span class="line-number">212</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">输出布局模板</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			layout
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$layoutFile</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$contentType</span> = <span class="var-default">'text/html'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$varPrefix</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$display</span> = <span class="var-default">true</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$layout</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$layout</span><span class="var-description">: 指定要输出的布局模板</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$charset</span><span class="var-description">: 输出编码</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$contentType</span><span class="var-description">: 输出类型</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$varPrefix</span><span class="var-description">: 模板变量前缀</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$display</span><span class="var-description">: 是否直接显示</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$layoutFile</span>			</li>
				</ul>
		
			
	</div>
<a name="methodshowTime" id="showTime"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">showTime</span> (line <span class="line-number">163</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">显示运行时间、数据库操作、缓存次数、内存使用信息</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			showTime
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$startTime</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$startTime</span><span class="var-description">: 开始时间</span>			</li>
				</ul>
		
			
	</div>
<a name="methodtrace" id="trace"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">trace</span> (line <span class="line-number">92</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Trace变量赋值</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			trace
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$title</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">''</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$name</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$value</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$title</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Thu, 27 Mar 2008 08:21:00 +0000 by 塞北的雪
	</p>
	</div></body>
</html>